# Contributor: Michael Mason <ms13sp@gmail.com>
# Maintainer: Michael Mason <ms13sp@gmail.com>
pkgname=rtnppd
pkgver=1.7b
pkgrel=8
pkgdesc="A program route TNPP 3.8 (Telocator Network Paging Protocol) packets between serial and other links"
url="https://sourceforge.net/projects/rtnppd/"
arch="all"
license="GPL"
depends=""
makedepends="postgresql-dev"
install="$pkgname.pre-install"
subpackages="$pkgname-dbg"
source="https://downloads.sourceforge.net/$pkgname/$pkgname-$pkgver.tar.gz
	$pkgname.initd
	$pkgname.confd"
pkgusers="rtnppd"
pkggroups="rtnppd"
builddir=$srcdir/"$pkgname"

build() {
	cd "$builddir"
	make || return 1
}
package() {
	cd "$builddir"
	#make DESTDIR="$pkgdir" install
	install -m755 -D "$srcdir"/$pkgname.initd "$pkgdir"/etc/init.d/$pkgname
	install -m644 -D "$srcdir"/$pkgname.confd "$pkgdir"/etc/conf.d/$pkgname
	install -m755 -D ./rtnppd "$pkgdir"/usr/sbin/rtnppd
	install -m755 -D ./tnpppage "$pkgdir"/usr/sbin/tnpppage
	install -m755 -D ./testq "$pkgdir"/usr/sbin/testq
	install -m644 -D ./rtnppd.conf "$pkgdir"/etc/rtnppd/rtnppd.conf
	install -m644 -D ./tnpp_dev.conf "$pkgdir"/etc/rtnppd/tnpp_dev.conf
	install -m644 -D ./tnpp_trans.conf "$pkgdir"/etc/rtnppd/tnpp_trans.conf
}

sha512sums="b8b80bca5d78ee070a1c403e544c2de4b65de74bef5f400f43125bdb289e43d4fc8dadb0d089a59f4bc8b41c6fc75ed6d307412cde90022ea75a6617128a4432  rtnppd-1.7b.tar.gz
7d01cbe3a25d1dd8f19e04510c3938f478c9f0d5f75f9adcd9921366562fb0820bdfcc47f6462c5fa3a711966ef2e0fb93b9bc93cbed88ae8f866f83608b6432  rtnppd.initd
3a8d709c4650eb38fd9c4ec5367d69eadab458fd5a6515517405f9344f19211d8673ec5dca00d56c87b765e916e0720b49c8f3cd6b54761b52af6c31dc7b6139  rtnppd.confd"
